<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // 1、数组的定义
    let arr = [1, 2, 3]
    let names = ['小明', '小红', '小刚']
    console.log(arr);
    console.log(names);
    // 2、数组的使用 数组名[索引]，索引是从0开始
    console.log(arr[0]);
    console.log(names[2]);
    // 3、数组可以存储任意类型的数据
    let info = ['小明', 18, '男']
    console.log(info[0]);
    console.log(info[1]);
    console.log(info[2]);

  </script>
</body>

</html>